home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / asmexam.arc / MEMSIZE.LST < prev    next >
File List  |  1984-07-02  |  3KB  |  72 lines

  1.  The IBM Personal Computer Assembler 07-02-84        PAGE    1-1
  2. MEMSIZE - reset PC/DOS memory size variable
  3.  
  4.  
  5. 1                        name memsize
  6. 2                        page 55,132
  7. 3                        title MEMSIZE - reset PC/DOS memory size variable
  8. 4                        ;    for IBM PC memsize variable at location 40:13h
  9. 5                        ;    is # of  K bytes  see technical reference p A-2
  10. 6                        ;
  11. 7                        ;    for TI PC memsize variable at 0:0198h
  12. 8                        ;    is # of paragraphs ie 16 byte blocks  see technical
  13. 9                        ;    reference p 3-6
  14. 10                        ;
  15. 11     0000                   cseg   segment byte
  16. 12                               assume  cs:cseg,ds:cseg
  17. 13     0100                          org     100h
  18. 14     0100  BB 0040              start: mov     bx,40h   ; for TI PC make this 00h
  19. 15     0103  8E DB                     mov     ds,bx
  20. 16     0105  BB 0013                     mov     bx,013h  ; for TI PC make this 0198h
  21. 17     0108  8B 07                     mov     ax,[bx]
  22. 18     010A  81 3F 0220                cmp     word ptr [bx],220h  ; for TI PC change 220h to 8800h
  23. 19     010E  7C 28                     jl      exit1
  24. 20                        
  25. 21     0110  B8 8800                     mov     ax,8800h
  26. 22     0113  BB 0000                     mov     bx,0
  27. 23     0116  3D A000              loop1: cmp     ax,0a000h ; for TIPC change 0a000h to 0c000h
  28. 24     0119  74 0F                     je      exit2
  29. 25     011B  8E D8                     mov     ds,ax
  30. 26     011D  89 07                     mov     [bx],ax
  31. 27     011F  8B 0F                     mov     cx,[bx]
  32. 28     0121  3B C1                     cmp     ax,cx
  33. 29     0123  75 05                     jne     exit2
  34. 30     0125  8C D8                     mov     ax,ds
  35. 31     0127  40                     inc     ax
  36. 32     0128  EB EC                     jmp    loop1
  37. 33                        
  38. 34     012A                   exit2:
  39. 35     012A  B1 06                     mov     cl,6       ; for TI PC delete this line
  40. 36     012C  D3 E8                     shr     ax,cl      ; and delete this line
  41. 37     012E  BB 0040                     mov     bx,40h     ; for TI PC change 40h to 00h
  42. 38     0131  8E DB                     mov     ds,bx
  43. 39     0133  BB 0013                     mov     bx,013h    ; for TI PC chance 013h  to 0198h
  44. 40     0136  89 07                     mov     [bx],ax
  45. 41     0138  CD 20              exit1: int     20h
  46. 42     013A                   cseg   ends
  47. 43                        
  48. 44                               end     start
  49.  
  50.  The IBM Personal Computer Assembler 07-02-84        PAGE    Symbols-1
  51. MEMSIZE - reset PC/DOS memory size variable
  52.  
  53.  
  54. Segments and groups:
  55.  
  56.          N a m e              Size    align    combine    class
  57.  
  58. CSEG . . . . . . . . . . . . . .    013A    BYTE      NONE    
  59.  
  60. Symbols:            
  61.  
  62.          N a m e              Type    Value    Attr         
  63.  
  64. EXIT1. . . . . . . . . . . . . .    L NEAR     0138    CSEG
  65. EXIT2. . . . . . . . . . . . . .    L NEAR     012A    CSEG
  66. LOOP1. . . . . . . . . . . . . .    L NEAR     0116    CSEG
  67. START. . . . . . . . . . . . . .    L NEAR     0100    CSEG
  68.  
  69. Warning Severe
  70. Errors    Errors 
  71. 0    0
  72.